﻿using System.Collections.Generic;
using System.Data;

namespace Ledict.ConditionExtract.IDAL
{
    /// <summary>
    ///     创建索引数据处理接口
    /// </summary>
    public interface ICreateIndexDal 
    {
        /// <summary>
        ///     该方法暂时没用
        /// </summary>
        /// <param name="cateGoryIds"></param>
        /// <returns></returns>
        DataTable GetIndexByCateGoryId(IList<string> cateGoryIds);

        /// <summary>
        ///     得到建立检索的所需的数据
        /// </summary>
        /// <returns></returns>
        DataTable GetIndex(IList<string> headWords);

        /// <summary>
        ///     取出本次数据总数
        /// </summary>
        /// <param name="headWords"></param>
        /// <returns></returns>
        int GetSumCount(IList<string> headWords);

        /// <summary>
        ///     取出该案例ID关联的所有案由
        /// </summary>
        /// <param name="caseId">案例ID</param>
        /// <returns></returns>
        DataTable GetHeadWords(string caseId);

        /// <summary>
        ///     取逻辑段的文本内容
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        string GetParagraphText(string id);

        /// <summary>
        ///     取该案例的所有逻辑段(140,150)
        /// </summary>
        /// <param name="caseId">案例ID</param>
        /// <returns></returns>
        DataTable GetParagraph(string caseId);

        /// <summary>
        ///     添加索引后更改状态
        /// </summary>
        /// <param name="caseId">案例ID</param>
        /// <returns></returns>
        bool UpdateIndexStatus(int caseId);

        /// <summary>
        ///     根据案例类别，取出本次数据总数
        /// </summary>
        /// <param name="cateGoryId">案例类别</param>
        /// <returns></returns>
        int GetCaseSumCount(int cateGoryId);

        /// <summary>
        ///     得到建立检索的所需的数据
        /// </summary>
        /// <param name="cateGoryId">案例类别</param>
        /// <returns></returns>
        DataTable GetCaseIndex(int cateGoryId);
    }
}